home *** CD-ROM | disk | FTP | other *** search
- #ifndef CLIB_GAMES_PROTOS_H
- #define CLIB_GAMES_PROTOS_H
-
- /*
- ** $VER: games_protos.h V0.6B
- **
- ** C prototypes.
- **
- ** (C) Copyright 1996-1997 DreamWorld Productions.
- ** All Rights Reserved
- */
-
- #ifndef GAMES_GMS_H
- #include <games/games.h>
- #endif
-
- #ifndef EXEC_TYPES_H
- #include <exec/types.h>
- #endif
-
- #ifndef EXEC_TASKS_H
- #include <exec/tasks.h>
- #endif
-
- /************************************************************************************
- ** Standard functions
- */
-
- ULONG InitGPI(UWORD GPI_ID);
- ULONG RemoveGPI(UWORD GPI_ID);
- ULONG SetUserPrefs(char *PrefsName);
- void CloseGMS();
- ULONG InitTags(APTR Structure, APTR TagList);
- struct GMSTask * FindGMSTask();
- void GMSForbid();
- void GMSPermit();
-
- void InitJoyPorts(void);
- ULONG ReadMouse(UWORD PortName);
- ULONG ReadJoyPort(UWORD PortName, UWORD ReturnType);
- ULONG ReadJoyStick(UWORD PortName);
- ULONG ReadJoyPad(UWORD PortName);
- ULONG ReadSegaPad(UWORD PortName);
- ULONG ReadAnalogue(UWORD PortName);
- ULONG ReadKey(struct Keys *);
- void WaitLMB(void);
- void WaitTime(UWORD MicroSeconds);
-
- ULONG FastRandom(ULONG Range);
- ULONG SlowRandom(ULONG Range);
- APTR WriteDec(LONG Number, LONG AmtDigits, char *Destination);
- APTR WriteHex(LONG Number, LONG AmtDigits, char *Destination);
-
- void AddInputHandler(void);
- void RemInputHandler(void);
- void AddInterrupt(APTR Interrupt, UWORD IntNum, UWORD IntPri);
- void RemInterrupt(APTR IntBase);
- APTR AllocMemBlock(ULONG Size, ULONG MemType);
- void FreeMemBlock(APTR MemBlock);
- ULONG AddTrack(ULONG Resource, ULONG Data, void *Routine);
- void DeleteTrack(ULONG Key);
-
- struct File * OpenFile(char *Filename, ULONG Flags);
- ULONG ReadFile(struct File *, APTR Buffer, ULONG Length);
- ULONG WriteFile(struct File *, APTR Buffer, ULONG Length);
- void CloseFile(struct File *);
-
- APTR SmartLoad(char *FileName, APTR Destination, ULONG MemType);
- APTR QuickLoad(char *FileName, APTR Destination, ULONG MemType);
- APTR SmartUnpack(APTR Source, APTR Destination, ULONG Password, ULONG MemType);
- ULONG SmartSave(char *FileName, APTR Source, APTR SrcLength);
-
- APTR GetPicInfo(APTR PicHeader, struct Picture *);
- ULONG UnpackPic(APTR Source, struct Picture *);
- struct Picture * LoadPic(struct Picture *);
- struct Picture * LoadPicTags(unsigned long tag1, ...);
- struct Picture * LoadPicFile(char *Filename, ULONG Options);
- void FreePic(struct Picture *);
-
- void InitDestruct(void *DestructCode, APTR DestructStack);
- void SelfDestruct(void);
- void Armageddon(ULONG Key);
- ULONG FingerOfDeath(struct GMSTask *);
-
- APTR GetPicture(void);
- APTR GetStructure(ULONG ID);
- APTR FreeStructure(APTR Structure);
-
- APTR LoadObjectFile(char *Filename);
- APTR GetObject(APTR ObjectBase, char *Name);
- APTR GetObjectList(APTR ObjectBase, APTR);
- void FreeObjectFile(APTR ObjectBase);
- APTR GrabObjectList(APTR ObjectBase);
- APTR CopyOjbect(APTR ObjectBase, char *Name);
-
- void DebugMessage(ULONG Type, char *Text);
- void ErrorMessage(ULONG ErrorCode);
- void StepBack(void);
- ULONG DebugActive(void);
- void DebugInactive(void);
- ULONG Awaken(struct GMSTask *);
-
- /************************************************************************************
- ** Screens.GPI functions
- */
-
- APTR AllocVideoMem(ULONG Size);
- APTR GetScreen(void);
- struct GameScreen * AddScreen(APTR GameScreen);
- struct GameScreen * AddScreenTags(ULONG tag1, ...);
- void DeleteScreen(struct GameScreen *);
- void ShowScreen(struct GameScreen *);
- APTR HideScreen(struct GameScreen *);
- void Switch(void);
- void AutoSwitch(void);
- void SwapBuffers(struct GameScreen *);
- void WaitVBL(void);
- void WaitRastLine(WORD LinePosition);
- void RefreshScreen(struct GameScreen *);
- void RemakeScreen(struct GameScreen *);
- void MovePicture(struct GameScreen *);
- void ResetPicture(struct GameScreen *);
-
- /* Palette alteration functions */
-
- void UpdatePalette(struct GameScreen *);
- UWORD PaletteMorph(struct GameScreen *, UWORD FadeState, UWORD Speed,
- ULONG StartColour, ULONG AmtColours, APTR SrcPalette, APTR DestPalette);
- UWORD PaletteToColour(struct GameScreen *, UWORD FadeState, UWORD Speed,
- ULONG StartColour, ULONG AmtColours, APTR Palette, ULONG RRGGBB);
- UWORD ColourMorph(struct GameScreen *, UWORD FadeState, UWORD Speed,
- ULONG StartColour, ULONG AmtColours, ULONG SrcColour, ULONG DestColour);
- UWORD ColourToPalette(struct GameScreen *, UWORD FadeState, UWORD Speed,
- ULONG StartColour, ULONG AmtColours, APTR Palette, ULONG RRGGBB);
- void ChangeColours(struct GameScreen *, UWORD FadeState, APTR Colours,
- UWORD StartColour, UWORD AmtColours);
- void BlankColours(struct GameScreen *);
-
- /* Rasterlist functions */
-
- ULONG InitRasterlist(struct GameScreen *);
- void UpdateRasterlist(struct GameScreen *);
- void UpdateRasterCommand(struct GameScreen *, APTR Command);
- void UpdateRasterCommands(struct GameScreen *, APTR Command, UWORD Amount);
- void UpdateRasterLines(struct GameScreen *);
- void RemoveRasterlist(struct GameScreen *);
- void HideRasterlist(struct GameScreen *);
- void ShowRasterlist(struct GameScreen *);
-
- /* Sprite functions */
-
- struct Sprite * InitSprite(struct GameScreen *, struct Sprite *);
- struct Sprite * InitSpriteTags(struct GameScreen *, ULONG tag1Type, ...);
- void UpdateSprite(struct GameScreen *, struct Sprite *);
- void MoveSprite(struct GameScreen *, struct Sprite *);
- void HideSprite(struct GameScreen *, UWORD SpriteNum);
- void UpdateSpriteList(APTR SpriteList);
- void HideSpriteList(APTR SpriteList);
- void RemoveAllSprites(void);
- void ReturnAllSprites(void);
- void FreeSprite(struct Sprite *);
-
- void UpdateColour(struct GameScreen *, ULONG Colour, ULONG Value);
- void BlankOn(void);
- void BlankOff(void);
- ULONG MoveToFront(struct GameScreen *);
- ULONG MoveToBack(struct GameScreen *);
- ULONG TakeDisplay(struct GameScreen *);
- struct GameScreen * ReturnDisplay(void);
-
- void FreeVideoMem(APTR MemBlock);
- APTR GetSprite(void);
-
- /************************************************************************************
- ** Blitter.GPI functions.
- */
-
- APTR AllocBlitMem(ULONG Size);
- APTR GetBob(void);
- APTR GetMBob(void);
- ULONG AllocBlitter(void);
- void FreeBlitter(void);
- APTR InitBob(struct GameScreen *, APTR Bob);
- APTR InitBobTags(struct GameScreen *Screen, ULONG tag1Type, ...);
- APTR InitBobTagList(struct GameScreen *Screen, struct TagItem *tagList);
- void FreeBob(APTR Bob);
- void DrawBob(struct GameScreen *, APTR Bob, UWORD Buffer, struct Restorelist *);
- void DrawBobList(struct GameScreen *, LONG *BobList[], UWORD Buffer, struct Restorelist *);
- void ClearBob(struct GameScreen *, APTR Bob, UWORD Buffer);
- void DrawLine(struct GameScreen *, UWORD Buffer, WORD StartX,
- WORD StartY, WORD EndX, WORD EndY, ULONG Colour);
- void DrawUCLine(struct GameScreen *, UWORD Buffer, UWORD StartX,
- UWORD StartY, UWORD EndX, UWORD EndY, ULONG Colour);
-
- void CopyBuffer(struct GameScreen *, UWORD SrcBuffer, UWORD DestBuffer);
- void ClrScreen(struct GameScreen *, UWORD Buffer);
- void ClrArea(struct GameScreen *, UWORD StartX, UWORD StartY, UWORD EndX, UWORD EndY);
-
- struct Restorelist * InitRestore(ULONG AmtBuffers, ULONG Entries);
- void FreeRestore(struct Restorelist *);
- void ResetRestore(struct Restorelist *);
- void Restore(struct GameScreen *, struct Restorelist *);
- void CleanUpRestore(struct GameScreen *, struct Restorelist *);
-
- ULONG InitMap(struct GameScreen *, struct Map *);
- void DrawMap(struct GameScreen *, struct Map *);
- void DrawMapRow(struct GameScreen *, struct Map *);
- void FreeMap(struct Map *);
- void DrawMapTile(struct GameScreen *, struct Map *, WORD XCoord, WORD YCoord);
-
- void DrawPixel(struct GameScreen *, UWORD Buffer, WORD XCoord, WORD YCoord, ULONG Colour);
- void DrawUCPixel(struct GameScreen *, UWORD Buffer, WORD XCoord, WORD YCoord, ULONG Colour);
- void DrawPixelList(struct GameScreen *, UWORD Buffer, struct PixelList *);
- void DrawUCPixelList(struct GameScreen *, UWORD Buffer, struct PixelList *);
- ULONG ReadPixel(struct GameScreen *, UWORD Buffer, WORD XCoord, WORD YCoord);
- void ReadPixelList(struct GameScreen *, UWORD Buffer, struct PixelLIst *);
-
- void FreeBlitMem(APTR MemBlock);
-
- /************************************************************************************
- ** Sound.GPI functions
- */
-
- ULONG AllocAudio(void);
- void FreeAudio(void);
- ULONG InitSound(APTR Sound);
- void FreeSound(APTR Sound);
- UWORD CheckChannel(UWORD ChannelName);
-
- void PlaySound(APTR Sound);
- void PlaySoundDAC1(APTR Sound);
- void PlaySoundDAC2(APTR Sound);
- void PlaySoundDAC3(APTR Sound);
- void PlaySoundDAC4(APTR Sound);
- void PlaySoundPri(APTR Sound);
- void PlaySoundPriDAC1(APTR Sound);
- void PlaySoundPriDAC2(APTR Sound);
- void PlaySoundPriDAC3(APTR Sound);
- void PlaySoundPriDAC4(APTR Sound);
-
- void SetVolume(UWORD Channel, UWORD Volume);
- void FadeVolume(UWORD Channel);
- void StopSound(struct Sound *);
- void StopChannel(UWORD Channel);
-
- APTR AllocSoundMem(ULONG Size);
- APTR GetSound(void);
- void FreeSoundMem(APTR Memblock);
-
- #endif /* CLIB_GAMES_PROTOS_H */
-